<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
  <title>Title</title>
  <%@include file="/static/common/common.jsp"%>
  <script src="/static/js/role/role.js"></script>
  <style>
    .datagrid-cell-check input {
      margin-top: 2px;
    }

    .dialog-form {
      width: 100%;
      height: 100%;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      padding-top: 14px;
      padding-right: 20px;
    }

    .dialog-form>.row {
      display: flex;
      padding-top: 4px;
      padding-bottom: 4px;
      align-items: center;
      justify-content: space-between;

    }

    .dialog-form .left {
      width: 80px;
      padding-left: 20px;
    }

    #role_dialog .datagrid{
      margin-left: 20px;
    }
  </style>
</head>
<body>

<table id="role_datagrid"></table>

<div id="role_toolbar">
  <shiro:hasPermission name="role:saveOrUpdate" >
    <a class="easyui-linkbutton" iconCls="icon-add2 iconfont" plain="true" data-cmd="add">新增</a>
    <a class="easyui-linkbutton" iconCls="icon-bianji iconfont" plain="true" data-cmd="edit">编辑</a>
  </shiro:hasPermission>
  <a class="easyui-linkbutton" iconCls="iconfont icon-shanchu" plain="true" data-cmd="del">删除</a>
  <a class="easyui-linkbutton" iconCls="iconfont icon-sousuo" plain="true" data-cmd="query">搜索</a>
</div>
<div id="form_btns">
  <a class="easyui-linkbutton" iconCls="iconfont icon-dui" plain="true" data-cmd="save">保存</a>
  <a class="easyui-linkbutton" iconCls="iconfont icon-jujue" plain="true" data-cmd="cancel">取消</a>
</div>

<div id="role_dialog" class="easyui-dialog">
  <form method="post" class="dialog-form" id="role_form">
    <input type="hidden" name="id" id="roleId">
    <div class="row">
      <span class="left">角色名:</span>
      <input name="name" class="easyui-textbox" prompt="请输入角色名"
             data-options="invalidMessage:'该用户名已存在'"
             validType="remote['/role/validateName.do?id=' + roleId.value, 'name']">
      <span class="left">编号:</span>
      <input name="sn" class="easyui-textbox" prompt="请输入角色编号">
    </div>
    <div>
      <span class="left">菜单：</span>
      <input id="menu_combotree" class="easyui-combotree"
             data-options="url:'/menu/selectRootMenu.do', panelHeight:'auto', multiple: true, cascadeCheck: false">
    </div>
    <div class="row">
      <table id="allPermissions"></table>
      <table id="selfPermissions"></table>
    </div>
  </form>
</div>



<%--<div id="role_dialog_pas" class="easyui-dialog">--%>
  <%--<form method="post" class="dialog-form" id="role_form_pas">--%>
    <%--<input type="hidden" name="id" id="roleId_">--%>
    <%--<p>--%>
      <%--<span class="left">用户名:</span>--%>
      <%--<input name="username" class="easyui-textbox" prompt="请输入姓名"--%>
             <%--data-options="invalidMessage:'该用户名已存在'"--%>
             <%--validType="remote['/role/validateName.do?id=' + roleId.value, 'name']">--%>
    <%--</p>--%>
    <%--<p class="myPassword">--%>
      <%--<span class="left">密码:</span>--%>
      <%--<input name="password" class="easyui-passwordbox" prompt="请输入密码">--%>
    <%--</p>--%>
  <%--</form>--%>
<%--</div>--%>
</body>
</html>
